//
//  SLGlobalEnum.h
//  JFBase
//
//  Created by Jianbo Cai on 2019/8/20.
//  Copyright © 2019 Alan Wang. All rights reserved.
//

#ifndef SLGlobalEnum_h
#define SLGlobalEnum_h

/*
 * 网络请求相关错误码
 */
typedef NS_ENUM(int32_t, ErrorCode) {
    //服务器返回错误码
    ErrorCodeClientShouldDisplayErrMsg = 888,
    ErrorCodeHadRegister = 1000,
    ErrorCodeNotRegister = 1001,
    ErrorCodeErrPassword = 1002,
    ErrorCodeUpdateSuggest = 1003,
    ErrorCodeSessionInvalid = 1006,
    ErrorCodeSeniorQuoteEnableMsg = 1008,
    ErrorCodeQuoteInfoMsg = 1009,
    ErrorCodeQuoteInvalid = 1010,
    ErrorCodeErrInvitation = 1011,
    ErrorCodeExpiredInvitation = 1012,
    ErrorCodeErrCaptcha = 1021,
    ErrorCodeErrGuestInsufficientPermissions = 1111,
    ErrorCodeTradePasswordIncorrectOverTimes = 1300,//交易密码错误次数超限
    ErrorCodeTradePasswordIncorrect = 1301,//交易密码错误
    ErrorCodeNotTradeTime = 2105,
    ErrorCodePtfNotNeedToBuy = 2111, //组合免费，无需购买
    ErrorCodePtfNotAccess = 2022, //无权限浏览该信息
    ErrorCodeNotRequiredToFollow = 2205,//无需跟单
    ErrorCodeAdviserOverrun = 1203,    //添加投顾人数超限
    ErrorCodeAdviserCloseSquereAnswer = 10002,//投顾广场开关
    ErrorCodeNotSaveInvestPrefer = 10033,    //未定代码
    ErrorCodeServeNotEnd = 10013,//参与的付费服务未到期
    ErrorCodeAdviserSquereAnwserTimeout = 10009,//投顾广场回答超时
    //客户端自定义错误码用于本地使用 -10000以上错误code是*SDK使用请不要使用此区间code
    ErrorCodeInfoNotChange = -4000,
    ErrorCodeClientNetworkError = -4001,
    ErrorCodeEmptyErrorMessage = -4002,
    ErrorCodeEmptyResponseCode = -4003,
    ErrorCodeBadResponseData = -4004,
    ErrorCodeClientUnknowError = -9999,
    
    //需要业务处理
    ErrorCodeUpdateForce   = 1004,
    ErrorCodeNotBindPhone = 1022,
    ErrorCodeBenBenLockErrorCode = 2009,
    ErrorCodeTradeAccountMorePwdErrorCode = 2006,
    ErrorCodeTradeAccountLockErrorCode = 2004,
    ErrorCodeTradeAccountUnDeviceErrorCode = 2012,
    ErrorCodeTradeAccountLineDownErrorCode = 2014,
    ErrorCodeFetchNoPhoneErrorCode=2021,
    
    //生物识别token失效
    ErrorLaTokenLost=10002
    
};


typedef NS_ENUM(int8_t, SLUserType) {
    SLUserTypeGuest,//游客
    SLUserTypeNormal,//普通用户
    SLUserTypeInvestmentAdviser,//投顾
    SLUserTypeOfficialUser,     //官方账号 如 玖富证券
    SLUserTypeOpenAccountWitness  //见证人
};

typedef NS_ENUM(int8_t, QNOperationPermission) {
    QNOperationPermissionCanDelete = 1,
    QNOperationPermissionCannotDelete = 0
};

//群组信息标志位
typedef NS_ENUM(int32_t, SLIMGroupInfo) {
    SLIMGroupInfoID         = 1ll << 0,
    SLIMGroupInfoName       = 1ll << 1,
    SLIMGroupInfoDesc       = 1ll << 2,
    SLIMGroupInfoIcon       = 1ll << 3,
    SLIMGroupInfoMaxUsers   = 1ll << 4,
    SLIMGroupInfoCharge     = 1ll << 5,
    SLIMGroupInfoNeedVerify = 1ll << 6,
    SLIMGroupInfoAnnouncement = 1ll << 7
};


/**
 *  评论类型
 */
typedef NS_ENUM(NSUInteger, QNCommentsType){
    /**
     *  未知评论类型
     */
    QNCommentsTypeUnknow,
    /**
     *  回复
     */
    QNCommentsTypeReply,
    /**
     *  点赞
     */
    QNCommentsTypeLike
};

/**
 *  删除笔记、评论、取消点赞类型
 */
typedef NS_ENUM(int32_t, SLNoteDeleteType){
    /**
     *  位置类型
     */
    SLNoteDeleteTypeUnknow,
    /**
     *  删除笔记
     */
    SLNoteDeleteTypeNote,
    /**
     *  删除评论
     */
    SLNoteDeleteTypeComment,
    /**
     *  取消点赞
     */
    SLNoteDeleteTypeLike
};

/**
 *  个人主页观点类型
 */
typedef NS_ENUM(NSInteger, SLNoteViewpointType){
    /**
     *  未知类型
     */
    SLNoteViewpointTypeUnknow,
    /**
     *  个人主页观点
     */
    SLNoteViewpointTypePersonalHomePageViewpoint,
    /**
     *  个人投资圈动态
     */
    SLNoteViewpointTypePersonalCircleFeed,
    /**
     *  个人评论动态
     */
    GZNoteViewpointTypeOptionalStockCircleFeed,
    /**
     *  组合的投资笔记
     */
    SLNoteViewpointTypePortfolioNote
};


/**
 *  广告位链接类型
 */
typedef NS_ENUM(int16_t, SLAdLinkType){
    SLAdLinkTypeUnknow = 1000,
    /**
     *  投资圈广告
     */
    SLAdLinkTypeCircle = 1001,
    /**
     *  弹屏广告
     */
    SLAdLinkTypePop = 1002,
    
    /**
     *  投顾我的服务界面广告
     */
    SLAdLinkTypeAdviserService = 1003,
    
    /**
     * 启动页广告
     */
    SLAdLinkTypeSetupBoot = 1006,
    
    /**
     * 首页轮播广告
     */
    SLAdLinkTypeHomeBanner = 1007
};


/**
 *  消息分组类型
 */
typedef NS_ENUM(int32_t, SLMessageGroupType) {
    /**
     *  未知类型
     */
    SLMessageGroupTypeUnknow,
    /**
     *  投资圈消息
     */
    SLMessageGroupTypeCircle = 2001,
    /**
     *  调仓消息
     */
    SLMessageGroupTypeRebalance = 12002,
    /**
     *  评论消息
     */
    SLMessageGroupTypeComment = 12003,
    /**
     *  点赞消息
     */
    SLMessageGroupTypeLike = 12005,
    /**
     *  关注消息
     */
    SLMessageGroupTypeFollow = 12006,
    /**
     *  服务消息
     */
    SLMessageGroupTypeService = 12007,
    /**
     *  群助手
     */
    SLMessageGroupTypeGroupAssistant = 12900,
    /**
     *  股价提醒
     */
    GZMessageGroupTypeStockReminder = 12012,
    /**
     *  个股推送
     */
    SLMessageGroupTypeStockPush = 12013,
    /**
     *  新股消息
     */
    SLMessageGroupTypeNewStock = 12014,
    /**
     *  股票交易
     */
    SLMessageGroupTypeStockTransaction = 12015,
    /**
     *  订阅消息
     */
    SLMessageGroupTypeSubscribe = 12018,
    /**
     *  暗盘消息
     */
    SLMessageGroupTypeDarkTransaction = 12019
};

#endif /* SLGlobalEnum_h */
